Skip to main content

Last Update: 2025/3/26

LLMVision Image Generation API

The LLMVision Image Generation API allows you to create images from textual descriptions using LLMVersion's DALL-E model. This document provides an overview of the API endpoints, request parameters, and response structure.

Endpoint

POST https://platform.llmprovider.ai/v1/images/generations

Request Headers

HeaderValue
AuthorizationBearer YOUR_API_KEY
Content-Typeapplication/json

Request Body

The request body should be a JSON object with the following parameters:

ParameterTypeDescription
modelstringThe model to use for image generation.
promptstringA text description of the desired image(s).
ninteger(Optional) The number of images to generate. Defaults to 1.
sizestring(Optional) The size of the generated images. Options: "256x256", "512x512", "1024x1024".
response_formatstring(Optional) The format of the generated images. Options: "url" or "b64_json".
userstring(Optional) A unique identifier for tracking your requests.

Example Request

{
"model": "ALLTools-dalle",
"prompt": "A cute baby sea otter",
"n": 1,
"size": "1024x1024",
"response_format": "url"
}

Response Body

The response body will be a JSON object containing the generated images and related metadata.

FieldTypeDescription
createdintegerThe timestamp for when the image was created.
dataarrayAn array of generated image objects.

Example Response

{
"created": 1678891234,
"data": [
{
"url": "https://..."
},
{
"url": "https://..."
}
]
}

Example Request

curl -X POST https://platform.llmprovider.ai/v1/images/generations \
-H "Authorization: Bearer $YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ALLTools-dalle",
"prompt": "A cute baby sea otter",
"n": 1,
"size": "1024x1024"
}'

For any questions or further assistance, please contact us at [email protected].